package com.xuesong.user.controller;

import com.xuesong.common.R;
import com.xuesong.user.entity.User;
import com.xuesong.user.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: UserController
 * @Description:
 * @author: Gong_Xuesong
 * @date 2021/12/7 16:14
 */
@RestController
@RequestMapping("/sys/user")
public class UserController {
    @Resource
    UserService userService;

    @GetMapping("list")
    public List<User> test() {
        List<User> list = userService.getList();
        return list;
    }

    @GetMapping("list")
    public R loginss(User user) {
        Map<String, Object> map = userService.login();
        return R.ok();
    }

    @PostMapping("login")
    public R login(@RequestBody User user) {

        return R.ok("aaa");
    }


}
